package com.subat.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * <p>
 * 
 * </p>
 *
 * @author subat
 * @since 2022-04-14
 */
@Getter
@Setter
@ApiModel(value = "User对象", description = "")
@ToString
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("ID")
        @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      @ApiModelProperty("用户名")
      private String username;

      @ApiModelProperty("密码")
      private String password;

      @ApiModelProperty("昵称")
      private String nickname;

      @ApiModelProperty("性别")
      private String sex;

      @ApiModelProperty("邮箱")
      private String email;

      @ApiModelProperty("电话号码")
      private String phone;

      @ApiModelProperty("地址")
      private String address;

      @TableField(value = "create_time")
      @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
      @ApiModelProperty("创建时间")
      private Date createTime;

      @TableField(value = "avatar_url")
      @ApiModelProperty("头像")
      private String avatarUrl;

      @ApiModelProperty("角色")
      private String role;

      @TableField(value = "major_id")
      @ApiModelProperty("专业")
      private Integer majorId;

      @ApiModelProperty("年级")
      private String grade;

}
